<template>
	<view class="temp">
		<image class="bg" :src="config.bg.info" mode="aspectFill"></image>
		<view class="main">
			<u-image shape="circle" :src="config.mine.info" @click="toImage(config.mine.info)" height="200" width="200">
			</u-image>
			<view class="hand">
				<view class="mview">
					<view class="hview"><text>求 职 简 历</text></view>
				</view>
			</view>
		</view>
		<scroll-view scroll-y="true" class="scroll">
			<view class="card">
				<view class="title">求职意向：</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">从事职业：</text>
						<view style="text-align: justify;">{{config.text0.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">期望月薪：</text>
						<view style="text-align: justify;">{{config.text1.info}}</view>
					</view>
				</view>
			</view>
			<view class="card">
				<view class="title">教育背景：</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">学校名称：</text>
						<view style="text-align: justify;">{{config.text2.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">所学专业：</text>
						<view style="text-align: justify;">{{config.text3.info}}</view>
					</view>
				</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">就读时间：</text>
						<view style="text-align: justify;">{{config.text4.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">学历学位：</text>
						<view style="text-align: justify;">{{config.text5.info}}</view>
					</view>
				</view>
			</view>
			<view class="card">
				<view class="title">证 书：</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">证书名称：</text>
						<view style="text-align: justify;">{{config.text6.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">获得时间：</text>
						<view style="text-align: justify;">{{config.text7.info}}</view>
					</view>
				</view>
				<u-gap height="20" bg-color="transparent"></u-gap>
				<u-image :src="config.image.info" width="670" height="400" @click="toImage(config.image.info)">
				</u-image>
			</view>
			<view class="card">
				<view class="title">工作经历：</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">公司名称：</text>
						<view style="text-align: justify;">{{config.text8.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">在职时间：</text>
						<view style="text-align: justify;">{{config.text9.info}}</view>
					</view>
				</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">职位名称：</text>
						<view style="text-align: justify;">{{config.text10.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">税前月薪：</text>
						<view style="text-align: justify;">{{config.text11.info}}</view>
					</view>
				</view>
				<view class="con-2">
					<view>
						<text style="color: #f08c00;">工作描述：</text>
						<view style="text-align: justify;">{{config.text12.info}}</view>
					</view>
				</view>
			</view>
			<view class="card">
				<view class="title">项目经验：</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">项目名称：</text>
						<view style="text-align: justify;">{{config.text13.info}}</view>
					</view>
					<view>
						<text style="color: #f08c00;">项目时间：</text>
						<view style="text-align: justify;">{{config.text14.info}}</view>
					</view>
				</view>
				<view class="con-1">
					<view>
						<text style="color: #f08c00;">项目职位：</text>
						<view style="text-align: justify;">{{config.text15.info}}</view>
					</view>
				</view>
				<view class="con-2">
					<view>
						<text style="color: #f08c00;">项目描述：</text>
						<view style="text-align: justify;">{{config.text16.info}}</view>
					</view>
				</view>
			</view>
			<view class="card">
				<view class="title">自我评价：</view>
				<view class="con-2">
					{{config.text17.info}}
				</view>
			</view>
			<view class="phone">
				<u-button open-type="share">分享简历</u-button>
				<u-button @click="phone">电话联系</u-button>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		name: 'tem-page04',
		props: ['config'],
		created() {
			console.log(this.config);
		},
		methods: {
			phone() {
				const phoneNumber = this.config.phone.info
				uni.makePhoneCall({
					phoneNumber
				});
			},
			toImage(image) {
				uni.previewImage({
					urls: [image]
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.temp {
		width: 100%;
		height: 100vh;
		position: relative;
		overflow: hidden;

		.phone {
			display: flex;
			justify-content: space-between;
			margin: 20rpx;

			u-button {
				width: 345rpx;
			}
		}

		.scroll {
			margin-top: 50rpx;
			height: calc(100vh - 290rpx);

			.card {
				background-color: rgba(255, 255, 255, 0.9);
				padding: 20rpx;
				margin: 20rpx;
				width: 710rpx;
				border-radius: 10rpx;
				line-height: 46rpx;

				.title {
					padding: 0 20rpx;
					border-left: 4px solid #fcc419;
					font-weight: bold;
				}

				.con-1 {
					display: flex;
					justify-content: space-between;
					margin-top: 20rpx;
					font-weight: 200;

					view {
						width: 325rpx;
					}
				}

				.con-2 {
					width: 670rpx;
				}
			}
		}

		.main {
			width: 750rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			background-color: rgba(0, 0, 0, 0.8);
			height: 240rpx;

			u-image {
				position: absolute;
				top: 50rpx;
				padding: 10rpx;
				border: 2px dashed #C9CACC;
				border-radius: 110rpx;
			}

			.hand {
				position: absolute;
				top: 240rpx;
				z-index: 100;
				background-color: #C9CACC;
				width: 750rpx;
				height: 50rpx;

				.mview {
					position: absolute;
					top: -10rpx;
					left: 225rpx;
					border-radius: 8rpx;
					height: 70rpx;
					background-color: #C4913E;
					width: 300rpx;

					.hview {
						height: 50rpx;
						width: 300rpx;
						margin: 10rpx 0;
						line-height: 46rpx;
						border-top: 4rpx dashed #fcc419;
						border-bottom: 4rpx dashed #fcc419;
						text-align: center;
					}
				}
			}
		}

		.bg {
			position: absolute;
			top: 0px;
			left: 0px;
			width: 100%;
			height: 100%;
			z-index: -100;
		}
	}
</style>
